package com.mright.step01.xml;

import com.mright.step01.api.EchoApi;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @author zhaochuanzhen
 * @since 2022/2/10 11:23 下午
 */
public class EchoConsumer {

    public static void main(String[] args) throws IOException {
        final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("step01-consumer.xml");
        context.start();

        final EchoApi echoApi = context.getBean(EchoApi.class);
        final String result = echoApi.echo("hello world! 你好，世界! ");
        System.out.println(result);
    }
}
